
import query from '@dfeidao/atom-nodejs/db/query';

interface Message {
	filter: {
		productid: string;
		formid_arr: string[];
	};
}

// 端点下拉框初始化的值
export default async function atom(msg: Message, action_id: string, session_id: string) {
	const systemid = '12';
	const { exec, prepare } = query(action_id, session_id, systemid);
	prepare('pub_form_code', ['action_name', 'formid', 'action_keyword', 'code'], { productid: msg.filter.productid, formid: { $in: msg.filter.formid_arr } }, 200, 1, [], []);
	const [data] = await exec();
	return { dataArray: data };
}
